import { ref } from 'vue'

export default function useSearch(callback: () => void) {
  const keyword = ref<string>('')
  function search() {
    callback && callback()
  }
  function reset() {
    keyword.value = ''
    callback && callback()
  }
  return { keyword, search, reset }
}
